using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VGPAINST
    {
        public DataRow Convert2GPAINST(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryGPAINST(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["GPIMANDANT"] = " ".PadRight(2 ); 
         dwReturn["GPIART"] = " ".PadRight(20 ); 
         dwReturn["GPIVAR"] = " ".PadRight(3 ); 
         dwReturn["GPITYP"] = " ".PadRight(1 ); 
         dwReturn["GPIAUFMSL"] = " ".PadRight(2 ); 
         dwReturn["GPIPACKTYP"] = " ".PadRight(4 ); 
         dwReturn["GPIMTYP"] = " ".PadRight(8 ); 
         dwReturn["GPIAENDZL"] = " ".PadRight(0 ); 
         dwReturn["GPIAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["GPIAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["GPINEUBEN"] = " ".PadRight(8 ); 
         dwReturn["GPINEUDAT"] = " ".PadRight(0 ); 
         dwReturn["GPIANZPACK"] = " ".PadRight(0 ); 
         dwReturn["GPIBTARA"] = " ".PadRight(0 ); 
         dwReturn["GPIPALKZ"] = " ".PadRight(1 ); 
         dwReturn["GPITOLKZ"] = " ".PadRight(1 ); 
         dwReturn["GPIKGMAX"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW1"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW1"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW1"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ1"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX1"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL1"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP1"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP1"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW2"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW2"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW2"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ2"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX2"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL2"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP2"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP2"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW3"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW3"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW3"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ3"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX3"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL3"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP3"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP3"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW4"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW4"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW4"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ4"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX4"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL4"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP4"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP4"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW5"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW5"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW5"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ5"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX5"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL5"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP5"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP5"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW6"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW6"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW6"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ6"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX6"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL6"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP6"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP6"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW7"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW7"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW7"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ7"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX7"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL7"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP7"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP7"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW8"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW8"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW8"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ8"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX8"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL8"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP8"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP8"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW9"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW9"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW9"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ9"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX9"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL9"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP9"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP9"] = " ".PadRight(0 ); 
         dwReturn["GPISPULGEW10"] = " ".PadRight(0 ); 
         dwReturn["GPIVSPULGEW10"] = " ".PadRight(0 ); 
         dwReturn["GPIBSPULGEW10"] = " ".PadRight(0 ); 
         dwReturn["GPISPULANZ10"] = " ".PadRight(0 ); 
         dwReturn["GPISPULMAX10"] = " ".PadRight(0 ); 
         dwReturn["GPIUAUFMSL10"] = " ".PadRight(2 ); 
         dwReturn["GPIHUELTYP10"] = " ".PadRight(6 ); 
         dwReturn["GPIMTRSP10"] = " ".PadRight(0 ); 
         dwReturn["GPIFILLER"] = " ".PadRight(42 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapGPAINST(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveGPAINST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryGPAINST(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapGPAINST(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertGPAINST(dwLocal, ITXDBVERSION);
            }
            UpdateGPAINST(dwLocal);
        }
        public void InsertGPAINST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO GPAINST(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryGPAINST(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM GPAINST WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM GPAINST  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "GPAINST";
            Return = Result;
            return Return;
        }
        public void DeleteGPAINST(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM GPAINST   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateGPAINST(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE GPAINST SET "
                    +"GPIMANDANT= :GPIMANDANT,"
                    +"GPIART= :GPIART,"
                    +"GPIVAR= :GPIVAR,"
                    +"GPITYP= :GPITYP,"
                    +"GPIAUFMSL= :GPIAUFMSL,"
                    +"GPIPACKTYP= :GPIPACKTYP,"
                    +"GPIMTYP= :GPIMTYP,"
                    +"GPIAENDZL= :GPIAENDZL,"
                    +"GPIAENDBEN= :GPIAENDBEN,"
                    +"GPIAENDDAT= :GPIAENDDAT,"
                    +"GPINEUBEN= :GPINEUBEN,"
                    +"GPINEUDAT= :GPINEUDAT,"
                    +"GPIANZPACK= :GPIANZPACK,"
                    +"GPIBTARA= :GPIBTARA,"
                    +"GPIPALKZ= :GPIPALKZ,"
                    +"GPITOLKZ= :GPITOLKZ,"
                    +"GPIKGMAX= :GPIKGMAX,"
                    +"GPISPULGEW1= :GPISPULGEW1,"
                    +"GPIVSPULGEW1= :GPIVSPULGEW1,"
                    +"GPIBSPULGEW1= :GPIBSPULGEW1,"
                    +"GPISPULANZ1= :GPISPULANZ1,"
                    +"GPISPULMAX1= :GPISPULMAX1,"
                    +"GPIUAUFMSL1= :GPIUAUFMSL1,"
                    +"GPIHUELTYP1= :GPIHUELTYP1,"
                    +"GPIMTRSP1= :GPIMTRSP1,"
                    +"GPISPULGEW2= :GPISPULGEW2,"
                    +"GPIVSPULGEW2= :GPIVSPULGEW2,"
                    +"GPIBSPULGEW2= :GPIBSPULGEW2,"
                    +"GPISPULANZ2= :GPISPULANZ2,"
                    +"GPISPULMAX2= :GPISPULMAX2,"
                    +"GPIUAUFMSL2= :GPIUAUFMSL2,"
                    +"GPIHUELTYP2= :GPIHUELTYP2,"
                    +"GPIMTRSP2= :GPIMTRSP2,"
                    +"GPISPULGEW3= :GPISPULGEW3,"
                    +"GPIVSPULGEW3= :GPIVSPULGEW3,"
                    +"GPIBSPULGEW3= :GPIBSPULGEW3,"
                    +"GPISPULANZ3= :GPISPULANZ3,"
                    +"GPISPULMAX3= :GPISPULMAX3,"
                    +"GPIUAUFMSL3= :GPIUAUFMSL3,"
                    +"GPIHUELTYP3= :GPIHUELTYP3,"
                    +"GPIMTRSP3= :GPIMTRSP3,"
                    +"GPISPULGEW4= :GPISPULGEW4,"
                    +"GPIVSPULGEW4= :GPIVSPULGEW4,"
                    +"GPIBSPULGEW4= :GPIBSPULGEW4,"
                    +"GPISPULANZ4= :GPISPULANZ4,"
                    +"GPISPULMAX4= :GPISPULMAX4,"
                    +"GPIUAUFMSL4= :GPIUAUFMSL4,"
                    +"GPIHUELTYP4= :GPIHUELTYP4,"
                    +"GPIMTRSP4= :GPIMTRSP4,"
                    +"GPISPULGEW5= :GPISPULGEW5,"
                    +"GPIVSPULGEW5= :GPIVSPULGEW5,"
                    +"GPIBSPULGEW5= :GPIBSPULGEW5,"
                    +"GPISPULANZ5= :GPISPULANZ5,"
                    +"GPISPULMAX5= :GPISPULMAX5,"
                    +"GPIUAUFMSL5= :GPIUAUFMSL5,"
                    +"GPIHUELTYP5= :GPIHUELTYP5,"
                    +"GPIMTRSP5= :GPIMTRSP5,"
                    +"GPISPULGEW6= :GPISPULGEW6,"
                    +"GPIVSPULGEW6= :GPIVSPULGEW6,"
                    +"GPIBSPULGEW6= :GPIBSPULGEW6,"
                    +"GPISPULANZ6= :GPISPULANZ6,"
                    +"GPISPULMAX6= :GPISPULMAX6,"
                    +"GPIUAUFMSL6= :GPIUAUFMSL6,"
                    +"GPIHUELTYP6= :GPIHUELTYP6,"
                    +"GPIMTRSP6= :GPIMTRSP6,"
                    +"GPISPULGEW7= :GPISPULGEW7,"
                    +"GPIVSPULGEW7= :GPIVSPULGEW7,"
                    +"GPIBSPULGEW7= :GPIBSPULGEW7,"
                    +"GPISPULANZ7= :GPISPULANZ7,"
                    +"GPISPULMAX7= :GPISPULMAX7,"
                    +"GPIUAUFMSL7= :GPIUAUFMSL7,"
                    +"GPIHUELTYP7= :GPIHUELTYP7,"
                    +"GPIMTRSP7= :GPIMTRSP7,"
                    +"GPISPULGEW8= :GPISPULGEW8,"
                    +"GPIVSPULGEW8= :GPIVSPULGEW8,"
                    +"GPIBSPULGEW8= :GPIBSPULGEW8,"
                    +"GPISPULANZ8= :GPISPULANZ8,"
                    +"GPISPULMAX8= :GPISPULMAX8,"
                    +"GPIUAUFMSL8= :GPIUAUFMSL8,"
                    +"GPIHUELTYP8= :GPIHUELTYP8,"
                    +"GPIMTRSP8= :GPIMTRSP8,"
                    +"GPISPULGEW9= :GPISPULGEW9,"
                    +"GPIVSPULGEW9= :GPIVSPULGEW9,"
                    +"GPIBSPULGEW9= :GPIBSPULGEW9,"
                    +"GPISPULANZ9= :GPISPULANZ9,"
                    +"GPISPULMAX9= :GPISPULMAX9,"
                    +"GPIUAUFMSL9= :GPIUAUFMSL9,"
                    +"GPIHUELTYP9= :GPIHUELTYP9,"
                    +"GPIMTRSP9= :GPIMTRSP9,"
                    +"GPISPULGEW10= :GPISPULGEW10,"
                    +"GPIVSPULGEW10= :GPIVSPULGEW10,"
                    +"GPIBSPULGEW10= :GPIBSPULGEW10,"
                    +"GPISPULANZ10= :GPISPULANZ10,"
                    +"GPISPULMAX10= :GPISPULMAX10,"
                    +"GPIUAUFMSL10= :GPIUAUFMSL10,"
                    +"GPIHUELTYP10= :GPIHUELTYP10,"
                    +"GPIMTRSP10= :GPIMTRSP10,"
                    +"GPIFILLER= :GPIFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("GPIMANDANT", OracleType.NVarChar).Value = dwData["GPIMANDANT"].ToString(); 
          or1.Parameters.Add("GPIART", OracleType.NVarChar).Value = dwData["GPIART"].ToString(); 
          or1.Parameters.Add("GPIVAR", OracleType.NVarChar).Value = dwData["GPIVAR"].ToString(); 
          or1.Parameters.Add("GPITYP", OracleType.NVarChar).Value = dwData["GPITYP"].ToString(); 
          or1.Parameters.Add("GPIAUFMSL", OracleType.NVarChar).Value = dwData["GPIAUFMSL"].ToString(); 
          or1.Parameters.Add("GPIPACKTYP", OracleType.NVarChar).Value = dwData["GPIPACKTYP"].ToString(); 
          or1.Parameters.Add("GPIMTYP", OracleType.NVarChar).Value = dwData["GPIMTYP"].ToString(); 
          or1.Parameters.Add("GPIAENDZL", OracleType.NVarChar).Value = dwData["GPIAENDZL"].ToString(); 
          or1.Parameters.Add("GPIAENDBEN", OracleType.NVarChar).Value = dwData["GPIAENDBEN"].ToString(); 
          or1.Parameters.Add("GPIAENDDAT", OracleType.NVarChar).Value = dwData["GPIAENDDAT"].ToString(); 
          or1.Parameters.Add("GPINEUBEN", OracleType.NVarChar).Value = dwData["GPINEUBEN"].ToString(); 
          or1.Parameters.Add("GPINEUDAT", OracleType.NVarChar).Value = dwData["GPINEUDAT"].ToString(); 
          or1.Parameters.Add("GPIANZPACK", OracleType.NVarChar).Value = dwData["GPIANZPACK"].ToString(); 
          or1.Parameters.Add("GPIBTARA", OracleType.NVarChar).Value = dwData["GPIBTARA"].ToString(); 
          or1.Parameters.Add("GPIPALKZ", OracleType.NVarChar).Value = dwData["GPIPALKZ"].ToString(); 
          or1.Parameters.Add("GPITOLKZ", OracleType.NVarChar).Value = dwData["GPITOLKZ"].ToString(); 
          or1.Parameters.Add("GPIKGMAX", OracleType.NVarChar).Value = dwData["GPIKGMAX"].ToString(); 
          or1.Parameters.Add("GPISPULGEW1", OracleType.NVarChar).Value = dwData["GPISPULGEW1"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW1", OracleType.NVarChar).Value = dwData["GPIVSPULGEW1"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW1", OracleType.NVarChar).Value = dwData["GPIBSPULGEW1"].ToString(); 
          or1.Parameters.Add("GPISPULANZ1", OracleType.NVarChar).Value = dwData["GPISPULANZ1"].ToString(); 
          or1.Parameters.Add("GPISPULMAX1", OracleType.NVarChar).Value = dwData["GPISPULMAX1"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL1", OracleType.NVarChar).Value = dwData["GPIUAUFMSL1"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP1", OracleType.NVarChar).Value = dwData["GPIHUELTYP1"].ToString(); 
          or1.Parameters.Add("GPIMTRSP1", OracleType.NVarChar).Value = dwData["GPIMTRSP1"].ToString(); 
          or1.Parameters.Add("GPISPULGEW2", OracleType.NVarChar).Value = dwData["GPISPULGEW2"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW2", OracleType.NVarChar).Value = dwData["GPIVSPULGEW2"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW2", OracleType.NVarChar).Value = dwData["GPIBSPULGEW2"].ToString(); 
          or1.Parameters.Add("GPISPULANZ2", OracleType.NVarChar).Value = dwData["GPISPULANZ2"].ToString(); 
          or1.Parameters.Add("GPISPULMAX2", OracleType.NVarChar).Value = dwData["GPISPULMAX2"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL2", OracleType.NVarChar).Value = dwData["GPIUAUFMSL2"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP2", OracleType.NVarChar).Value = dwData["GPIHUELTYP2"].ToString(); 
          or1.Parameters.Add("GPIMTRSP2", OracleType.NVarChar).Value = dwData["GPIMTRSP2"].ToString(); 
          or1.Parameters.Add("GPISPULGEW3", OracleType.NVarChar).Value = dwData["GPISPULGEW3"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW3", OracleType.NVarChar).Value = dwData["GPIVSPULGEW3"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW3", OracleType.NVarChar).Value = dwData["GPIBSPULGEW3"].ToString(); 
          or1.Parameters.Add("GPISPULANZ3", OracleType.NVarChar).Value = dwData["GPISPULANZ3"].ToString(); 
          or1.Parameters.Add("GPISPULMAX3", OracleType.NVarChar).Value = dwData["GPISPULMAX3"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL3", OracleType.NVarChar).Value = dwData["GPIUAUFMSL3"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP3", OracleType.NVarChar).Value = dwData["GPIHUELTYP3"].ToString(); 
          or1.Parameters.Add("GPIMTRSP3", OracleType.NVarChar).Value = dwData["GPIMTRSP3"].ToString(); 
          or1.Parameters.Add("GPISPULGEW4", OracleType.NVarChar).Value = dwData["GPISPULGEW4"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW4", OracleType.NVarChar).Value = dwData["GPIVSPULGEW4"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW4", OracleType.NVarChar).Value = dwData["GPIBSPULGEW4"].ToString(); 
          or1.Parameters.Add("GPISPULANZ4", OracleType.NVarChar).Value = dwData["GPISPULANZ4"].ToString(); 
          or1.Parameters.Add("GPISPULMAX4", OracleType.NVarChar).Value = dwData["GPISPULMAX4"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL4", OracleType.NVarChar).Value = dwData["GPIUAUFMSL4"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP4", OracleType.NVarChar).Value = dwData["GPIHUELTYP4"].ToString(); 
          or1.Parameters.Add("GPIMTRSP4", OracleType.NVarChar).Value = dwData["GPIMTRSP4"].ToString(); 
          or1.Parameters.Add("GPISPULGEW5", OracleType.NVarChar).Value = dwData["GPISPULGEW5"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW5", OracleType.NVarChar).Value = dwData["GPIVSPULGEW5"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW5", OracleType.NVarChar).Value = dwData["GPIBSPULGEW5"].ToString(); 
          or1.Parameters.Add("GPISPULANZ5", OracleType.NVarChar).Value = dwData["GPISPULANZ5"].ToString(); 
          or1.Parameters.Add("GPISPULMAX5", OracleType.NVarChar).Value = dwData["GPISPULMAX5"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL5", OracleType.NVarChar).Value = dwData["GPIUAUFMSL5"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP5", OracleType.NVarChar).Value = dwData["GPIHUELTYP5"].ToString(); 
          or1.Parameters.Add("GPIMTRSP5", OracleType.NVarChar).Value = dwData["GPIMTRSP5"].ToString(); 
          or1.Parameters.Add("GPISPULGEW6", OracleType.NVarChar).Value = dwData["GPISPULGEW6"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW6", OracleType.NVarChar).Value = dwData["GPIVSPULGEW6"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW6", OracleType.NVarChar).Value = dwData["GPIBSPULGEW6"].ToString(); 
          or1.Parameters.Add("GPISPULANZ6", OracleType.NVarChar).Value = dwData["GPISPULANZ6"].ToString(); 
          or1.Parameters.Add("GPISPULMAX6", OracleType.NVarChar).Value = dwData["GPISPULMAX6"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL6", OracleType.NVarChar).Value = dwData["GPIUAUFMSL6"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP6", OracleType.NVarChar).Value = dwData["GPIHUELTYP6"].ToString(); 
          or1.Parameters.Add("GPIMTRSP6", OracleType.NVarChar).Value = dwData["GPIMTRSP6"].ToString(); 
          or1.Parameters.Add("GPISPULGEW7", OracleType.NVarChar).Value = dwData["GPISPULGEW7"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW7", OracleType.NVarChar).Value = dwData["GPIVSPULGEW7"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW7", OracleType.NVarChar).Value = dwData["GPIBSPULGEW7"].ToString(); 
          or1.Parameters.Add("GPISPULANZ7", OracleType.NVarChar).Value = dwData["GPISPULANZ7"].ToString(); 
          or1.Parameters.Add("GPISPULMAX7", OracleType.NVarChar).Value = dwData["GPISPULMAX7"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL7", OracleType.NVarChar).Value = dwData["GPIUAUFMSL7"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP7", OracleType.NVarChar).Value = dwData["GPIHUELTYP7"].ToString(); 
          or1.Parameters.Add("GPIMTRSP7", OracleType.NVarChar).Value = dwData["GPIMTRSP7"].ToString(); 
          or1.Parameters.Add("GPISPULGEW8", OracleType.NVarChar).Value = dwData["GPISPULGEW8"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW8", OracleType.NVarChar).Value = dwData["GPIVSPULGEW8"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW8", OracleType.NVarChar).Value = dwData["GPIBSPULGEW8"].ToString(); 
          or1.Parameters.Add("GPISPULANZ8", OracleType.NVarChar).Value = dwData["GPISPULANZ8"].ToString(); 
          or1.Parameters.Add("GPISPULMAX8", OracleType.NVarChar).Value = dwData["GPISPULMAX8"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL8", OracleType.NVarChar).Value = dwData["GPIUAUFMSL8"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP8", OracleType.NVarChar).Value = dwData["GPIHUELTYP8"].ToString(); 
          or1.Parameters.Add("GPIMTRSP8", OracleType.NVarChar).Value = dwData["GPIMTRSP8"].ToString(); 
          or1.Parameters.Add("GPISPULGEW9", OracleType.NVarChar).Value = dwData["GPISPULGEW9"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW9", OracleType.NVarChar).Value = dwData["GPIVSPULGEW9"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW9", OracleType.NVarChar).Value = dwData["GPIBSPULGEW9"].ToString(); 
          or1.Parameters.Add("GPISPULANZ9", OracleType.NVarChar).Value = dwData["GPISPULANZ9"].ToString(); 
          or1.Parameters.Add("GPISPULMAX9", OracleType.NVarChar).Value = dwData["GPISPULMAX9"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL9", OracleType.NVarChar).Value = dwData["GPIUAUFMSL9"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP9", OracleType.NVarChar).Value = dwData["GPIHUELTYP9"].ToString(); 
          or1.Parameters.Add("GPIMTRSP9", OracleType.NVarChar).Value = dwData["GPIMTRSP9"].ToString(); 
          or1.Parameters.Add("GPISPULGEW10", OracleType.NVarChar).Value = dwData["GPISPULGEW10"].ToString(); 
          or1.Parameters.Add("GPIVSPULGEW10", OracleType.NVarChar).Value = dwData["GPIVSPULGEW10"].ToString(); 
          or1.Parameters.Add("GPIBSPULGEW10", OracleType.NVarChar).Value = dwData["GPIBSPULGEW10"].ToString(); 
          or1.Parameters.Add("GPISPULANZ10", OracleType.NVarChar).Value = dwData["GPISPULANZ10"].ToString(); 
          or1.Parameters.Add("GPISPULMAX10", OracleType.NVarChar).Value = dwData["GPISPULMAX10"].ToString(); 
          or1.Parameters.Add("GPIUAUFMSL10", OracleType.NVarChar).Value = dwData["GPIUAUFMSL10"].ToString(); 
          or1.Parameters.Add("GPIHUELTYP10", OracleType.NVarChar).Value = dwData["GPIHUELTYP10"].ToString(); 
          or1.Parameters.Add("GPIMTRSP10", OracleType.NVarChar).Value = dwData["GPIMTRSP10"].ToString(); 
          or1.Parameters.Add("GPIFILLER", OracleType.NVarChar).Value = dwData["GPIFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
